<base href="<?php echo base_url();?>" />
<link rel="stylesheet" href="assets/style.css" type="text/css" media="screen"/>

<table>
	<thead>
	    <tr>
	      <th>ID</th>
	      <th>Fragenart</th>
	      <th>Frage</th>
	      <th>Antwort 1</th>
	      <th>Antwort 2</th>
	      <th>Antwort 3</th>
	      <th>Antwort 4</th>
	      <th>Antwort 5</th>
	      <th>Lösung 1</th>
	      <th>Lösung 2</th>
	      <th>Lösung 3</th>
	      <th>Punkte</th>
	      <th>Bearbeiten</th>      
	    </tr>
  	</thead>
	<tbody >
		<?php foreach ($fragen as $row): ?>
	    <tr>
	        <td><?php echo $row['ID'];?></td>
	        <td><?php echo $row['Fragenart'];?></td>
	        <td><?php echo $row['Frage'];?></td>
	        <td><?php echo $row['Antwort1'];?></td>
	        <td><?php echo $row['Antwort2'];?></td>
	        <td><?php echo $row['Antwort3'];?></td>
	        <td><?php echo $row['Antwort4'];?></td>
	        <td><?php echo $row['Antwort5'];?></td>
	        <td><?php echo $row['Loesung1'];?></td>
	        <td><?php echo $row['Loesung2'];?></td>
	        <td><?php echo $row['Loesung3'];?></td>
	        <td><?php echo $row['Punkte'];?></td>
	        <td>
		        <?php $this->load->helper(array('form')); ?>
		    	<?php echo validation_errors(); ?>
				<?php echo form_open('fragen_controller/validate_view')?>
				<input type="input" name="fragenid" hidden="true" value=<?php echo $row['ID'];?>  />
	        	<input type='submit' name='submit' value='Ändern' > 	       
	        </td>
	 		</form>        
	    </tr>
		<?php endforeach; ?>
	</tbody>
</table>
<?php $this->load->helper(array('form')); ?>
<?php echo validation_errors(); ?>
<?php echo form_open('fragen_controller/create_view')?>
	<input type='submit' name='submit' value='Neue Frage' > 